import CreepExtension from './extension'

import { assignPrototype } from 'utils/utils'
import CreepMoveExtension from './CreepMoveExtension'
import EntityExtension from './entityExtension'

/**
 * 挂载 RoomPosition 拓展
 */
 export default () => {
    // 保存原始 move，在 creepExtension 里会进行修改
    // if (!Creep.prototype._move) Creep.prototype._move = Creep.prototype.move
    if (!Creep.prototype._heal) Creep.prototype._heal = Creep.prototype.heal
    if (!Creep.prototype._move) Creep.prototype._move = Creep.prototype.move
    if (!Creep.prototype._say) Creep.prototype._say = Creep.prototype.say
    if (!Creep.prototype._withdraw) Creep.prototype._withdraw = Creep.prototype.withdraw
    assignPrototype(Creep, EntityExtension)
    assignPrototype(Creep, CreepExtension)
    assignPrototype(Creep, CreepMoveExtension)
    
}
